package com.scaffold.myproject.web.convert;


import com.scaffold.myproject.model.req.demo.UserReq;
import com.scaffold.myproject.model.vo.demo.UserVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * @author lx
 * @date 2025/6/12
 * @Description
 */
@Mapper
public interface UserConvert {
    UserConvert  INSTANCE = Mappers.getMapper(UserConvert.class);

    UserVO DTOToVO(UserReq userReq);

//两个对象转到一个对象中去
/*        @Mapping(source = "customer.firstName", target = "forename")
        @Mapping(source = "customer.lastName", target = "surname")
        @Mapping(source = "address.street", target = "street")
        @Mapping(source = "address.postalcode", target = "postalcode")
        @Mapping(source = "address.county", target = "county")
        DeliveryAddress from(Customer customer, Address address);*/


}
